package com.bz.websocket.error;

/**
 * @author zhongyongbin
 * @since 2021/5/10
 */
public enum CommonErrorCode implements ErrorCode {

    /**
     * 协议错误
     */
    PROTOCOL_ERROR(1000, "Protocol error."),

    /**
     * 会话失效
     */
    SESSION_NOT_ALIVE(1001, "Session is not alive."),

    /**
     * 系统错误
     */
    SYSTEM_ERROR(1002, "System error.");

    private final int errorCode;

    private final String message;

    CommonErrorCode(int errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }


    @Override
    public int getErrorCode() {
        return 0;
    }

    @Override
    public String getMessage() {
        return null;
    }
}
